Skip to content

fix(frontend): drop deprecated tsconfig baseUrl (RAN-11)#64

Closed
aksOps wants to merge 1 commit into
mainfrom
fix/ran11-tsconfig-baseurl
Closed

fix(frontend): drop deprecated tsconfig baseUrl (RAN-11)#64
aksOps wants to merge 1 commit into
mainfrom
fix/ran11-tsconfig-baseurl

Conversation

@aksOps
Copy link
Copy Markdown
Contributor

@aksOps aksOps commented Apr 24, 2026

Summary

Fixes RAN-11. The frontend tsconfig.json sets baseUrl: ".", which TypeScript 5.5+ flags as TS5101 (deprecated, removed in TS 7). On Node >= 22 (current LTS), frontend-maven-plugin resolves the latest typescript@~5.7.x and tsc -b fails, breaking mvn test / mvn package for any developer not pinned to Node 20.11.0. CI only survives because the plugin downloads its own pinned Node.

Fix

Drop baseUrl from src/main/frontend/tsconfig.json. The paths entry ("@/*": ["./src/*"]) is retained; under moduleResolution: "bundler" TypeScript resolves paths relative to the tsconfig.json directory without baseUrl. Vite already wires @ via resolve.alias in vite.config.ts, so runtime behavior is unchanged. No ignoreDeprecations suppression introduced.

Verification

  • cd src/main/frontend && npm run build succeeds on Node v24.15.0 (tsc -b + vite build, 3594 modules transformed, 13.67s).
  • npx tsc -b --force exits 0 with no TS5101 / baseUrl / deprecation warnings.
  • CI green on this PR.

Scope

Single-line deletion in tsconfig.json. <nodeVersion> in pom.xml left on v20.11.0 intentionally — tracked separately if we want CI to surface Node-LTS issues earlier.

TypeScript 5.5 deprecated baseUrl (TS5101). Removing it makes the
local `mvn test` / `npm run build` green on Node >= 22 without a
silent `ignoreDeprecations` suppression. The `paths` mapping is
retained and resolves relative to tsconfig.json under
`moduleResolution: "bundler"`, and Vite's `resolve.alias` already
handles `@/*` at bundle time.

Verified: `npm run build` (tsc -b && vite build) on Node v24.15.0.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@sonarqubecloud
Copy link
Copy Markdown

@aksOps
Copy link
Copy Markdown
Contributor Author

aksOps commented Apr 24, 2026

Superseded by #66 (RAN-27), which bundles the same tsconfig baseUrl fix together with a new frontend.skip property for backend-only contributors. Consolidating to one PR so the blocker resolves in a single merge.

@aksOps aksOps closed this Apr 24, 2026
aksOps added a commit that referenced this pull request Apr 25, 2026
…ip (RAN-27) (#66)

Two related fixes so `mvn test` / `mvn package` run green from a clean
checkout:

1. src/main/frontend/tsconfig.json: remove `"baseUrl": "."`.
   TypeScript 5.7 emits TS5101 (`Option 'baseUrl' is deprecated and
   will stop functioning in TypeScript 7.0`), which aborts `tsc -b`
   inside frontend-maven-plugin's `npm-build` execution and kills
   every Maven build.  Since TS 4.1, `paths` resolves relative to
   the tsconfig's own location, so the existing `"@/*": ["./src/*"]`
   mapping keeps working untouched — and Vite already resolves the
   same alias via `resolve.alias` in `vite.config.ts`.

2. pom.xml: add a `<frontend.skip>` property (default `false`) and
   wire `<skip>${frontend.skip}</skip>` into the frontend-maven-plugin
   configuration.  Backend-only contributors can now run
   `mvn test -Dfrontend.skip=true` and bypass the npm toolchain
   entirely while CI and release builds continue to bundle the SPA.

Acceptance
- `mvn test` green from a clean checkout on main
- `mvn test -Dfrontend.skip=true` skips the npm executions (verified
  locally: all three executions short-circuit, BUILD SUCCESS)
- `npm run build` under `src/main/frontend/` no longer errors on
  TS5101 (the previously blocking diagnostic)

Subsumes RAN-11 / PR #64 (same tsconfig change) and is the complete
fix for the blocker.

Co-authored-by: Paperclip <noreply@paperclip.ing>
@aksOps aksOps deleted the fix/ran11-tsconfig-baseurl branch April 26, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant